<template>
  <div>
    <v-header>
       
    </v-header>
    <div class="tab">
        <div class="tab-item">
           <router-link to="/goods">商品</router-link>
        </div>
        <div class="tab-item">
           <router-link to="/ratings">评论</router-link>
        </div>
        <div class="tab-item">
           <router-link to="/seller">商家</router-link>
        </div>
    </div>
    <!-- 切换路由刷新的是router-view中的内容: -->
     <router-view></router-view>

  </div>
</template>

<script>
import header from './components/header/header.vue'
export default {
  name: 'App',
  components:{
    'v-header':header
  }
}
</script>

<style lang="less" scoped>
.tab{
  display: flex;
  flex-direction:row;
  align-items:space-between;
  height: 40px;
  line-height: 40px;
  border-bottom: 1px solid #e5e5e5;
  .tab-item{
    flex:1;
    text-align: center;
    color:#4d555d;
    font-size: 14px;
    cursor: pointer;
    &>a{
      display: block;
      &.active{
        color:#f01414;
      }
    }
  }
}
</style>
